package com.example.conference.mapper;

import com.example.conference.domain.Dept;
import com.example.conference.domain.Role;
import com.example.conference.domain.vo.SelectVo;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface DeptMapper {
    @Select("select * from dept where dept_id = #{deptId}")
    @Results(id= "DeptMap", value= {
            @Result(column="dept_id", property="value" ),
            @Result(column="dept_name", property="name" ),
    })
    SelectVo queryByIdToSelect(Integer deptId);

    @Select("select * from dept where dept_id = #{deptId}")
    Dept queryById(Integer deptId);


    @Select("select * from dept")
    List<Dept> queryAll();
}
